import { getStorage, setStorage, removeStorage, clearStorage, getStorageSync } from '@tarojs/taro'
export default {
    getItem(key) {
        // return getStorage({ key }).then(res => {
        //     return res.data
        // })
        return Promise.resolve().then(() => {
            return getStorageSync(key)
        })
    },

    setItem(key, data) {
        return setStorage({ key, data })
    },

    removeItem(key) {
        return removeStorage({ key })
    },

    clear() {
        return clearStorage()
    }
}